<?php
include_once("./config.php");
$mysqli = new mysqli($dbhost, $dbuser, $dbpwd, $dbName);
if (!$mysqli->set_charset("utf8mb4")) {printf("Error loading character set utf8: %s\n", $mysqli->error);}
$one=9;
$two=30;
$three=145;
$total=$one+$two+$three+1;
$chi=array();
$er=array();
for ($i=1;$i<=$total;$i++){
//	$_key=rand(1,2);
//	if(1 == $_key && count($er) < 20){
//		$er[]=$i;
//	}else{
		$chi[]=$i;
//	}
}
shuffle($chi);
$oneData=array();
$twoData=array();
$threeData=array();

$mysqli->query("truncate chi");
for ($i=0;$i<$one;$i++){
	$_data= array_pop($chi);
	$mysqli->query("INSERT into chi(type,uid,status) values('1',".$_data.", 'work')");
}

var_dump($er);
for ($i=0;$i<$two;$i++){
	$_data= array_pop($chi);
	echo $_data;
	$mysqli->query("INSERT into chi(type,uid,status) values('2',".$_data.", 'work')");
}

for ($i=0;$i<$three;$i++){
	$_data= array_pop($chi);
	$mysqli->query("INSERT into chi(type,uid,status) values('3',".$_data.", 'work')");
}






